﻿using Core.DomainServices;
using Insfrastructure.DomainServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace HtmlToWord
{
    /// <summary>
    /// This is a sample Export Html to Word files using DocumentFormat.OpenXml.2.5 library
    /// If you have any questions let me know, my email: bin.nguyen.van@gmail.com
    /// </summary>
    class Program
    {
        private static string[] URLs = { "http://javascript.info/tutorial/object-oriented-programming", "http://oocss.org/", 
                                         "http://thesassway.com/intermediate/using-object-oriented-css-with-sass", "https://codex.wordpress.org/Theme_Development",
                                         "http://javascriptissexy.com/oop-in-javascript-what-you-need-to-know/", "http://learn.jquery.com/about-jquery/how-jquery-works/"};

        static void Main(string[] args)
        {
            var clientService = new WebClientService();
            var appConfig = new AppConfig();

            var items = new ExportToWord(appConfig, clientService).Export(URLs);
            if (items != null && items.Any())
            {
                foreach (var item in items) Console.WriteLine("Output File Name => " + item);
            }
            Console.WriteLine("Output to Folder => " + appConfig.OutputFolder);
            Console.ReadLine();
        }
    }
}
